﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace lol
{
    class Program
    {
        public static Hero[] heros = new Hero[5];
        static void Main(string[] args)
        {
            Sign();
            Role();
        }
        static void Sign()//登录
        {
            bool zj;
            do
            {
                Console.WriteLine("请输入账号");
                var Number = Console.ReadLine();
                Console.WriteLine("请输入密码");
                var Password = Convert.ToInt32(Console.ReadLine());
                if (Number == "scce" && Password == 123)
                {
                    zj = true;
                    Console.WriteLine("登录成功!");
                }
                else
                {
                    zj = false;
                    Console.WriteLine("登录失败");
                    Console.WriteLine("=========================");
                }
            } while (zj == false);
        }
            static void Role()//角色信息
            {
            while (true)
            {
                Console.WriteLine("选择英雄");
                string player = Console.ReadLine();
                double lose = 0;//打怪掉的血量
                double GoMoney = 0;//购买装备所用金币
                double killMoney =0;//杀怪获得金币
                double Money = 0;
                 Money = Money+killMoney-GoMoney;//当前拥有的金币
                double Level = 1;//角色等级
                double exp = 500 * Level;//升级所需经验
                double Exp = 0;//经验值
                if (Exp >= exp)
                {
                    Level = Level + 1;
                    Exp = Exp - exp;
                    exp = Level * 500;
                }
                string[] Name = new string[5];//角色名字
                string[] Dese = new string[5];//简介
                double[] BaseAttack = new double[5];//基础攻击力
                double[] BaseDefense = new double[5];//基础防御力
                double[] BaseLife = new double[5];//基础生命值
                double[] Attack = new double[5];//攻击力
                double[] Defense = new double[5];//防御力
                double[] Life = new double[5];//最大生命值
                for (int i = 0; i <heros.Length; i++)
                {
                    BaseAttack[0] = 43;
                    BaseAttack[1] = 62;
                    BaseAttack[2] = 47;
                    BaseAttack[3] = 42;
                    BaseAttack[4] = 58;
                    BaseDefense[0] = 35;
                    BaseDefense[1] = 30;
                    BaseDefense[2] = 37;
                    BaseDefense[3] = 32;
                    BaseDefense[4] = 28;
                    BaseLife[0] =120;
                    BaseLife[1] =100;
                    BaseLife[2] =130;
                    BaseLife[3] =110;
                    BaseLife[4] =80;
                    Attack[0]= BaseAttack[0] + BaseAttack[0] * Level * 0.3;
                    Attack[1] = BaseAttack[1] + BaseAttack[1] * Level * 0.3;
                    Attack[2] = BaseAttack[2] + BaseAttack[2] * Level * 0.3;
                    Attack[3] = BaseAttack[3] + BaseAttack[3] * Level * 0.3;
                    Attack[4] = BaseAttack[4] + BaseAttack[4] * Level * 0.3;
                    Defense[0] = BaseDefense[0] + BaseDefense[0] + Level * 0.15;
                    Defense[1] = BaseDefense[1]  + BaseDefense[1] + Level * 0.15;
                    Defense[2] = BaseDefense[2]  + BaseDefense[2] + Level * 0.15;
                    Defense[3] = BaseDefense[3]  + BaseDefense[3] + Level * 0.15;
                    Defense[4] = BaseDefense[4]  + BaseDefense[4] + Level * 0.15;
                    Life[0] = BaseLife[0] + BaseLife[0] * Level * 0.2;
                    Life[1] = BaseLife[1] + BaseLife[0] * Level * 0.2;
                    Life[2] = BaseLife[2] + BaseLife[0] * Level * 0.2;
                    Life[3] = BaseLife[3] + BaseLife[0] * Level * 0.2;
                    Life[4] = BaseLife[4] + BaseLife[0] * Level * 0.2;
                    Name[0] = "嘉文四世";
                    Name[1] = "卡特琳娜";
                    Name[2] = "盖伦";
                    Name[3] = "赵信";
                    Name[4] = "艾希";
                    Dese[0] = "他是联盟时代诞生的第一位光盾王室成员。";
                    Dese[1] = "她对刀剑的精通和她残酷的性格为她赢得了“不祥之刃”的称号。";
                    Dese[2] = "拥有“德玛西亚之力”头衔的英勇勇士，就是军队的模范。";
                    Dese[3] = "人称“德邦总管”的赵信是光盾王朝的私人管家。";
                    Dese[4] = "艾希继承了祖先精通的箭术，因此也继承了阿瓦罗萨“寒冰射手”的称号。";
                }
               
               
                
              
                
                //装备
                string AttackEquip = "";
                string DefenseEquip = "";
                //简介 名字
             
                Console.WriteLine("1.角色信息");
                Console.WriteLine("2.购买装备");
                Console.WriteLine("3.打怪升级");
                string Roles = Console.ReadLine();
                if (Roles == "1")
                {

                    if (player == "1")
                    {
                        double Hp = Life[0] - lose;
                        Console.WriteLine("-----角色信息-----");
                        Console.WriteLine($"角色：{Name[0]}   等级：{Level}   攻击力：{Attack[0]} 生命值：{Hp}/{Life[0]}   防御力：{BaseDefense[0]} ");
                        Console.WriteLine($"武器装备：{AttackEquip}");
                        Console.WriteLine($"防具装备：{DefenseEquip}");
                        Console.WriteLine($"经验值：{Exp}/{exp}");
                        Console.WriteLine($"金币：{Money}");
                        Console.WriteLine($"简介：{Dese[0]}");
                        Console.WriteLine("是否继续游戏y/n");
                        string bbb = Console.ReadLine();
                        if (bbb=="n")
                        {
                            break;
                        }
                        else if(bbb == "y")
                        {
                            continue;
                        }
                        else
                        {
                            Console.WriteLine("输入错误");
                        }
                    }
                    else if (player == "2")
                    {
                        double Hp = Life[1] - lose;
                       
                        Console.WriteLine("-----角色信息-----");
                        Console.WriteLine($"角色：{Name[1]}   等级：{Level}   攻击力：{Attack[1]} 生命值：{Hp}/{Life[1]}   防御力：{BaseDefense[1]} ");
                        Console.WriteLine($"武器装备：{AttackEquip}");
                        Console.WriteLine($"防具装备：{DefenseEquip}");
                        Console.WriteLine($"经验值：{Exp}/{exp}");
                        Console.WriteLine($"金币：{Money}");
                        Console.WriteLine($"简介：{Dese[1]}");
                        Console.WriteLine("是否继续游戏y/n");
                        string bbb = Console.ReadLine();
                        if (bbb == "n")
                        {
                            break;
                        }
                        else if (bbb == "y")
                        {
                            continue;
                        }
                        else
                        {
                            Console.WriteLine("输入错误");
                        }
                    }
                    else if (player == "3")
                    {
                        double Hp = Life[2] - lose;
                        
                        Console.WriteLine("-----角色信息-----");
                        Console.WriteLine($"角色：{Name[2]}   等级：{Level}   攻击力：{Attack} 生命值：{Hp}/{Life[2]}   防御力：{BaseDefense[2]} ");
                        Console.WriteLine($"武器装备：{AttackEquip}");
                        Console.WriteLine($"防具装备：{DefenseEquip}");
                        Console.WriteLine($"经验值：{Exp}/{exp}");
                        Console.WriteLine($"金币：{Money}");
                        Console.WriteLine($"简介：{Dese[2]}");
                        Console.WriteLine("是否继续游戏y/n");
                        string bbb = Console.ReadLine();
                        if (bbb == "n")
                        {
                            break;
                        }
                        else if (bbb == "y")
                        {
                            continue;
                        }
                        else
                        {
                            Console.WriteLine("输入错误");
                        }
                    }
                    else if (player == "4")
                    {
                        double Hp = Life[3] - lose;
                       
                        Console.WriteLine("-----角色信息-----");
                        Console.WriteLine($"角色：{Name[3]}   等级：{Level}   攻击力：{Attack[3]} 生命值：{Hp}/{Life[3]}   防御力：{BaseDefense[3]} ");
                        Console.WriteLine($"武器装备：{AttackEquip}");
                        Console.WriteLine($"防具装备：{DefenseEquip}");
                        Console.WriteLine($"经验值：{Exp}/{exp}");
                        Console.WriteLine($"金币：{Money}");
                        Console.WriteLine($"简介：{Dese[3]}");
                        Console.WriteLine("是否继续游戏y/n");
                        string bbb = Console.ReadLine();
                        if (bbb == "n")
                        {
                            break;
                        }
                        else if (bbb == "y")
                        {
                            continue;
                        }
                        else
                        {
                            Console.WriteLine("输入错误");
                        }

                    }
                    else if (player == "5")
                    {
                        double Hp = Life[4] - lose;
                      
                        Console.WriteLine("-----角色信息-----");
                        Console.WriteLine($"角色：{Name[4]}   等级：{Level}   攻击力：{Attack[4]} 生命值：{Hp}/{Life[4]}   防御力：{BaseDefense[4]} ");
                        Console.WriteLine($"武器装备：{AttackEquip}");
                        Console.WriteLine($"防具装备：{DefenseEquip}");
                        Console.WriteLine($"经验值：{Exp}/{exp}");
                        Console.WriteLine($"金币：{Money}");
                        Console.WriteLine($"简介：{Dese[4]}");
                        Console.WriteLine("是否继续游戏y/n");
                        string bbb = Console.ReadLine();
                        if (bbb == "n")
                        {
                            break;
                        }
                        else if (bbb == "y")
                        {
                            continue;
                        }
                        else
                        {
                            Console.WriteLine("输入错误");
                        }
                    }



                }

            }
        }



    }
}
